<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <title>修改类别信息</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="../../../elementUI/index.css">
  <link rel="stylesheet" href="../../../css/index.css"> 
</head> 

<body>
  <div id="app" class="minWidth">
    <el-form :model="form" :rules="rules" ref="contract" inline-message="true" style="width: 100%">
      <div class="table_titel">
        <div class="titel">修改类别信息</div>
      </div>
      <el-descriptions :column="2" border size="small">
        <el-descriptions-item label="类别名称">
          <el-form-item prop="Group_Block_Name">
            <el-input v-model.trim="form.Group_Block_Name" placeholder="请输入类别名称"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="类别背景图"> 
          <el-form-item prop="form.Picture_URL">
            <div class="preview" v-show="form.Picture_URL">
              <el-image class="el-upload-list__item-thumbnail" style="width: 148px; height: 148px" :src="form.Picture_URL"
                fit="contain"></el-image>
              <span class="el-upload-list__item-actions">
                <span @click="handlePictureCardPreview(DomainIMG.form.Picture_URL)"><i class="el-icon-zoom-in"></i></span>
                <span @click="handleRemove('front')"><i class="el-icon-delete"></i></span>
              </span>
            </div>
            <el-upload v-show="!form.Picture_URL" class="upload-demo" :show-file-list="false" list-type="picture-card" action=""
              accept="image/*" :before-upload="uploadFront2">
              <i slot="default" class="el-icon-plus"></i>
              <div class="el-upload__tip" slot="tip">上传正方形图片，且大小不超过120k</div>
            </el-upload>
          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>
      <div v-if="!isUrl" class="table_titel">
        <div class="titel">类别内容{{form.Children.group_block_detail.length==0?'(可添加)':''}}</div>
        <div class="operation">
          <el-button type="primary" size="small" @click="add_system_model_mark">新增</el-button>
          <el-button type="danger" size="small" @click="remove_system_model_mark">删除</el-button> 
        </div>
      </div>
      <el-descriptions :column="3" border size="small" v-for="(item,index) in form.Children.group_block_detail.filter(item => item.Row_Status != '1')" :key="index">
        <el-descriptions-item :label="index+1+'.类别内容名称'" >
          <el-form-item :prop="'Children.group_block_detail.'+index+'.Group_Block_Detail_Name'"
            :rules="{required: true, message: '类别内容不能为空', trigger: 'blur' }">
            <el-input v-model.trim="item.Group_Block_Detail_Name" placeholder="请输入类别内容名称"></el-input>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="类别内容图"> 
          <el-form-item prop="item.Icon">
            <div class="preview" v-show="item.Icon">
              <el-image class="el-upload-list__item-thumbnail" style="width: 148px; height: 148px" :src="item.Icon"
                fit="contain"></el-image>
              <span class="el-upload-list__item-actions">
                <span @click="handlePictureCardPreview(DomainIMG+form.Children.Icon)"><i class="el-icon-zoom-in"></i></span>
                <span @click="handleRemove('1')"><i class="el-icon-delete"></i></span>
              </span>
            </div>
            <el-upload v-show="!item.Icon" class="upload-demo" :show-file-list="false" list-type="picture-card" action=""
              accept="image/*" :before-upload="uploadFront2"> 
              <i slot="default" class="el-icon-plus"></i>
              <div class="el-upload__tip" slot="tip">上传正方形图片，且大小不超过120k</div>
            </el-upload>
          </el-form-item>
        </el-descriptions-item>
        <el-descriptions-item label="类别内容路径" >
          <el-form-item :prop="'Children.group_block_detail.'+index+'.Path'"
            :rules="{required: true, message: '类别内容路径不能为空', trigger: 'blur' }">
            <el-input v-model.trim="item.Path" placeholder="请输入类别内容路径"></el-input>
          </el-form-item>
        </el-descriptions-item>
      </el-descriptions>
      <el-form-item class="form-operation">
        <el-button @click="window.history.back()">返回</el-button>
        <el-button type="primary" :loading="loading" @click="submitForm('contract')">提交</el-button>
      </el-form-item>
    </el-form>
  </div>
  <script type="text/javascript" src="../../../js/jquery-3.6.0.min.js"></script>
  <script type="text/javascript" src="../../../js/jquery.cookie.js"></script>
  <script type="text/javascript" src="../../../js/vue.min.js"></script>
  <script type="text/javascript" src="../../../elementUI/index.js"></script>
  <script type="text/javascript" src="../../../js/utils.js"></script>
  <script type="text/javascript" src="../../../js/ID_Validity.js"></script>
  <script type="text/javascript" src="../../../js/compressor.js"></script>

  <script type="text/javascript" src="./js/Edit.js"></script>
  <script type="text/javascript">

  </script>
</body>

</html>